package com.huo.com.mdxinterface.config;

import com.huo.com.mdxinterface.MyIntercepter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Configuration
public class MyCOnfig extends WebMvcConfigurationSupport {

    @Autowired
    private MyIntercepter myIntercepter;

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(myIntercepter).addPathPatterns("/mdx/**");
    }
}
